package cn.buk.api.shdl.request;

import cn.buk.api.shdl.request.dto.PassengerPreference;
import cn.buk.api.shdl.request.dto.RequestPassenger;
import cn.buk.api.shdl.request.dto.RequestSegment;

import java.util.ArrayList;
import java.util.List;

/**
 * @author yfdai
 */
public class IntlFlightShoppingRequest {

  /**
   *用户请求的行程信息
   * 最多6个segment，CS、Nearby Shop时最多2个
   */
  private List<RequestSegment> segments;

  /**
   * 旅客信息
   * 最多支持9名旅客
   */
  private List<RequestPassenger> passengers;

  /**
   * 旅客偏好信息
   * 参照segments 此处的preferences 限制的是整个行
   */
  private PassengerPreference preferences;


  /**
   * 返回的最大结果数
   * 用户可以设置最多返回的结果数量，可以为空，按系统默认值返回,最多1000 个
   */
  private Integer maxResponse;


  public List<RequestSegment> getSegments() {
    if (segments == null) {
      segments = new ArrayList<>();
    }
    return segments;
  }

  public void setSegments(List<RequestSegment> segments) {
    this.segments = segments;
  }

  public PassengerPreference getPreferences() {
    if (preferences == null) {
      preferences = new PassengerPreference();
    }
    return preferences;
  }

  public void setPreferences(PassengerPreference preferences) {
    this.preferences = preferences;
  }

  public List<RequestPassenger> getPassengers() {
    if (passengers == null) {
      passengers = new ArrayList<>();
    }
    return passengers;
  }

  public void setPassengers(List<RequestPassenger> passengers) {
    this.passengers = passengers;
  }

  public Integer getMaxResponse() {
    return maxResponse;
  }

  public void setMaxResponse(Integer maxResponse) {
    this.maxResponse = maxResponse;
  }

//    "returnResultsInBatches": true,
//          "Index": 0,
//          "Key": null,
//          "TripType": "OW"
//  }

}
